
<!DOCTYPE html>
<html>
    <head>
        <title>爱代练</title>
        <meta charset="UTF-8">        
        <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'> 
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />                 
        
        <link href="../resource/ui-framework/easyui-1.5.2/themes/metro/easyui-c5a176a3d4.css" rel="stylesheet" />
        <link href="../resource/ui-framework/easyui-1.5.2/themes/icon-77a4ded0c8.css" rel="stylesheet" />

        <link href="../resource/ui-framework/bootstrap/3.0.3/css/bootstrap-a067b6d831.min.css" rel="stylesheet" />
        <link href="../resource/ui-framework/bootstrap-daterangepicker/css/daterangepicker-886dba62c4.css" rel="stylesheet" />
        <link href="../resource/ui-framework/font-awesome/css/font-awesome-a81d284b37.css" rel="stylesheet" />
        <link href="../resource/ui-framework/admin-lte/css/AdminLET-7d58b99a7e.css" rel="stylesheet" />
        <link href="../static/css/base-dc47892812.css" rel="stylesheet" />

        <link href="../resource/ui-framework/jason/searchbox/css/searchbox-398327fb84.css" rel="stylesheet" />
        <link href="../resource/ui-framework/jason/pager/css/pager-f077f5e880.css" rel="stylesheet" />
        <link href="../resource/ui-framework/jason/status/css/status-5f59ab3856.css" rel="stylesheet" />
        <link href="../resource/ui-framework/jason/selector/css/selector-23060c280e.css" rel="stylesheet" />
        <link href="../resource/ui-framework/jason/button/css/button-5ef10c798a.css" rel="stylesheet" />
        <link href="../resource/ui-framework/jason/orderarrow/css/orderarrow-dcf8eba7d1.css" rel="stylesheet" />
        
        <link href="../static/css/table-0e491bc98f.css" rel="stylesheet" />
        <link href="../static/css/easyui-ext-372f902530.css" rel="stylesheet" />      
        
    </head>
    <body class="skin-blue">

<header class="header">
    <a href="/order/operate" class="logo">
        <img src="/static/image/logo-inner.png" style="margin-top: 5px;" />
    </a>

    <nav class="navbar navbar-static-top" role="navigation">
        <div class="fl" style="width: 100%;">
            <div class="navbar-left">
                <ul class="nav navbar-nav">
                    <li class="dropdown user user-menu">
                        <a>你好，180****3023</a>
                    </li>
                    
                    <li>
                        <a href="/Report/MsgSummary">剩余短信数（<span >100</span>条）</a>
                    </li>
                    <li></li>
                </ul>
            </div>
            <div class="navbar-right">
                <ul class="nav navbar-nav">
                    <li>
                        <a target="_blank" href="http://amos.im.alisoft.com/msg.aw?v=2&uid=hhhsky&site=cntaobao&s=1&charset=utf-8" >
                            <img border="0" src="http://amos.im.alisoft.com/online.aw?v=2&uid=hhhsky&site=cntaobao&s=1&charset=utf-8" alt="点击这里给我发消息" />
                        </a>
                    </li>
                    <li>
                        <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=313985989&site=qq&menu=yes" style="margin-right: 20px;">
                            <img border="0" src="http://wpa.qq.com/pa?p=2:122041987:41" alt="点击这里给我发消息" title="点击这里给我发消息" />
                        </a>
                    </li>
                    <li class="dropdown user user-menu">
                        <a href="/system/addvalue" target="_blank">[ 短信充值 ]</a>
                    </li>
                    <li class="dropdown user user-menu">
                        <a href="/user/logout">[ 退出 ]</a>
                    </li>
                </ul>
            </div>
        </div>

        <div class="fl" style="width: 100%;">
            <marquee style="color: white; width: 100%;"
                onmouseover="this.stop()"
                onmouseout="this.start()"
                behavior="slide"
                scrollamount="5">
                
            </marquee>
        </div>
    </nav>
</header>

        <div class="alert alert-info alt-message" id="message" style="display:none">暂无消息！</div>

        <div class="wrapper row-offcanvas row-offcanvas-left">
            <aside class="left-side sidebar-offcanvas">

<input type="hidden" value="/order/operate" id="hdnURL"/>
<section class="sidebar">
    <ul class="sidebar-menu" id="menu">
            <li class="treeview active">
                <a href="#">
                    <i class="fa fa-folder"></i><span>订单管理</span>
                    <i class="fa fa-angle-left pull-right"></i>
                </a>

                <ul class="treeview-menu">
                        <li><a href="/order/create"><i class="fa"></i>订单创建</a></li>    
                        <li><a href="/order/operate" class="url-selected"><i class="fa"></i>订单管理</a></li>    
                </ul>
            </li>
            <li class="treeview active">
                <a href="#">
                    <i class="fa fa-user"></i><span>代练室管理</span>
                    <i class="fa fa-angle-left pull-right"></i>
                </a>

                <ul class="treeview-menu">
                        <li><a href="/company/profile"><i class="fa"></i>企业资料</a></li>    
                        <li><a href="/company/importsettings"><i class="fa"></i>导入设置</a></li>    
                        <li><a href="/SMS/TemplateList"><i class="fa"></i>短信设置</a></li>    
                        <li><a href="/company/tags"><i class="fa"></i>标签设置</a></li>    
                </ul>
            </li>
            <li class="treeview active">
                <a href="#">
                    <i class="fa fa-group"></i><span>人员管理</span>
                    <i class="fa fa-angle-left pull-right"></i>
                </a>

                <ul class="treeview-menu">
                        <li><a href="/company/role"><i class="fa"></i>岗位管理</a></li>    
                        <li><a href="/user/index"><i class="fa"></i>员工管理</a></li>    
                </ul>
            </li>
            <li class="treeview active">
                <a href="#">
                    <i class="fa fa-desktop"></i><span>内群管理</span>
                    <i class="fa fa-angle-left pull-right"></i>
                </a>

                <ul class="treeview-menu">
                        <li><a href="/StaffLeveling/Index"><i class="fa"></i>打手管理</a></li>    
                        <li><a href="/order/settlement"><i class="fa"></i>内群结算</a></li>    
                        <li><a href="/Report/StatementSummary"><i class="fa"></i>内群账单</a></li>    
                </ul>
            </li>
            <li class="treeview active">
                <a href="#">
                    <i class="fa fa-bar-chart-o"></i><span>报表</span>
                    <i class="fa fa-angle-left pull-right"></i>
                </a>

                <ul class="treeview-menu">
                        <li><a href="/report/stafforder"><i class="fa"></i>接单统计</a></li>    
                        <li><a href="/customer/index"><i class="fa"></i>客户报表</a></li>    
                        <li><a href="/Report/MsgSummary"><i class="fa"></i>短信报表</a></li>    
                </ul>
            </li>
            <li class="treeview active">
                <a href="#">
                    <i class="fa fa-user"></i><span>我的帐号</span>
                    <i class="fa fa-angle-left pull-right"></i>
                </a>

                <ul class="treeview-menu">
                        <li><a href="/user/myprofile"><i class="fa"></i>我的资料</a></li>    
                </ul>
            </li>
    </ul>
</section>
            </aside>            

            <aside class="right-side">
                                
                <section class="content">
                    

<div class="container" style="width:100%;">
	<div class="row">
		<div class="col-md-12 col-sm-12 col-xm-12">


<input type="hidden" value="2017/12/09 13:56" id="startDate"/>
<input type="hidden" value="2017/12/17 00:00" id="endDate"/>
<input type="hidden" value="2017/12/16,2017/12/17" id="rangeToday" />
<input type="hidden" value="2017/12/15,2017/12/16" id="rangeYesterday"/>
<input type="hidden" value="2017/12/10,2017/12/17" id="rangeLast7Days"/>
<input type="hidden" value="2017/11/17,2017/12/17" id="rangeLast30Days"/>
<input type="hidden" value="2017/12/01,2018/01/01" id="rangeCurrentMonth"/>
<input type="hidden" value="2017/11/01,2017/12/01" id="rangeLastMonth"/>

<input type="hidden" id="guid" />
<input type="hidden" id="guids" />

<div class="container" style="width: 100%;">
    <div class="row" style="margin-bottom: 10px;">
        <ul id="tabStatus"></ul>
    </div>
    <div class="row">
        <div class="fl" style="width: 100%">
            <ul>
                <li class="fl">
                    <input type="text" class="form-control" id="dateRange" style="width: 280px" />
                </li>
                <li class="fl ml10">
                    <input class="easyui-combobox" data-options="width:100,editable:false,valueField:'ID',textField:'Name'" id="game" />
                    <input class="easyui-combobox" data-options="width:100,editable:false,valueField:'ID',textField:'Name'" id="zone" />
                    <input class="easyui-combobox" data-options="width:125,editable:false,valueField:'ID',textField:'Name'" id="server" />
                </li>
                <li class="fl ml10">
                    <input class="easyui-combobox" data-options="width:100,editable:false,valueField:'ID',textField:'Name'" id="bizType" />
                    <input class="easyui-combobox" data-options="width:125,editable:false,valueField:'ID',textField:'Name'" id="tag" />
                    <input class="easyui-combobox" data-options="width:100,editable:false,valueField:'ID',textField:'Name'" id="platform" />
                </li>
                <li class="fl ml10">
                    <div id="statuses"></div>
                </li>
                <li class="fl ml10">
                    <div id="searchInput"></div>
                </li>
            </ul>
        </div>
    </div>
</div>

<table class="order mt10" style="float: left; margin-bottom: 5px;">
    <thead>
        <tr class="header">
            <td>
                <input type="checkbox" id="ck_selectAll_A" /></td>
            <td>游戏区服</td>
            <td>类型</td>
            <td style="width:300px;">代练项目</td>
            <td>发价</td>
            <td id="orderTarget1" style="cursor: pointer;">
                <div id="lblLeftTime"></div>
            </td>
            <td>
                <div class="ml" id="orderByLeftTime"></div>
            </td>
            <td>状态</td>
            <td>代练员</td>
            <td>角色名</td>
            <td>订单编号</td>
            <td>接价</td>
            <td>客服</td>
            <td>备注</td>
            <td>
                <div id="lblTime"></div>
            </td>
            <td>操作</td>
        </tr>
    </thead>
    <tbody id="orders">
    </tbody>
    <tfoot>
        <tr class="footer">
            <td>
                <input type="checkbox" id="ck_selectAll_B" /></td>
            <td colspan="15">
                <div class="fl">
                    <a class="btn-action fl" style="margin: 2px 5px;" id="btnCancelB">删除订单</a>
                    <a class="btn-action fl" style="margin: 2px 5px;" id="btnUpdateStatusB">更新状态</a>
                                            <a class="btn-action fl" style="margin: 2px 5px;" id="btnAssignB">批量发单</a>
                    <a class="btn-action fl" style="margin: 2px 5px;" id="btnExportA">批量导出订单</a>
                    <a class="btn-action fl" style="margin: 2px 5px;" id="btnExportB">导出TXT</a>
                </div>
                <div id="pager" class="fr" style="margin-top: 6px;"></div>
            </td>
        </tr>
        <tr class="footer">
            <td></td>
            <td colspan="15">
                <div class="fl fl20" style="height: 100%;">
                    <div class="fl legend-color" style="background-color: orange;">&nbsp;</div>
                    <div class="fl">未分配</div>
                    <div class="fl legend-color" style="background-color: green;">&nbsp;</div>
                    <div class="fl">未接手</div>
                    <div class="fl legend-color" style="background-color: gray;">&nbsp;</div>
                    <div class="fl">已结算</div>
                    <div class="fl legend-color" style="background-color: red;">&nbsp;</div>
                    <div class="fl">异常中</div>
                    <div class="fl legend-color" style="background-color: blue;">&nbsp;</div>
                    <div class="fl">已锁定</div>
                    <div class="fl legend-color" style="background-color: cyan;">&nbsp;</div>
                    <div class="fl">撤销中</div>
                    <div class="fl legend-color" style="background-color: purple;">&nbsp;</div>
                    <div class="fl">仲裁中</div>
                </div>
            </td>
        </tr>
        <tr class="footer">
            <td></td>
            <td colspan="15">
                <div class="fl fl20" style="height: 100%;">
                    <span style="color: red;">[多]</span>多个平台接单&nbsp;&nbsp;
                    <span style="color: red;">[撤]</span>有撤销中的平台订单&nbsp;&nbsp;
                    <span style="color: red;">[仲]</span>有仲裁中的平台订单
                </div>
            </td>
        </tr>
    </tfoot>
</table>

<div class="easyui-dialog" data-options="modal:true,closed:true,title:'订单备注',width:400,height:200" id="dlgComment">
</div>

<div class="easyui-dialog" data-options="modal:true,closed:true,title:'复制订单',width:400,height:200" id="dlgCopyOrder">
</div>

<script type="text/html" id="orderLoading">
    <tr class="project">
        <td colspan="16">
            <div style="display: block; width: 400px; margin: 10px auto;" id="loading">
                <img src="/static/image/loading.gif" />
            </div>
            <span style="width: 200px; margin: 10px auto;">数据加载中，请耐心等待...</span>
        </td>
    </tr>
</script>

<script type="text/html" id="orderTemplate">
    {{if data.length==0}}
        <tr class="project">
            <td colspan="16">
                <span style="width: 200px; margin: 10px auto;">没有符合条件的订单</span>
            </td>
        </tr>
    {{else}}
        
    {{/if}}

    {{each data as order i}}                    
        <tr class="project" data-options="{{order.OrderGuid}}^{{order.ProjectGuid}}" id="{{order.ProjectGuid}}">
            <td>
                <input type="checkbox" class="ck_select" data-options="{{order.ProjectGuid}}" />
            </td>
            <td style="text-align: left;">{{order.GameInfo}}</td>
            <td>{{order.BizType}}</td>
            <td style="text-align: left;">{{order.ProjectName}}</td>
            <td>
                <div class="digit_item">
                    {{if order.SendPrice>order.Price}}
                        <span style="color:red">￥{{order.SendPrice}}</span>
                    {{else}}
                        ￥{{order.SendPrice}}
                    {{/if}}
                </div>
            </td>
            <td colspan="2">
                <div class="digit_item" style="min-width: 80px;">
                    {{if order.LeftTime != "" && order.IsMinus}}
                        <span style="color: red">超{{order.LeftTime}}</span>
                    {{else}}
                        <span>{{order.LeftTime}}</span>
                    {{/if}}                                                                   
                </div>
            </td>
            {{if order.OrderStatus==12}}
                <td class="ex">{{order.OrderStatusName}}</td>
            {{else}} 
                {{if order.OrderStatus==1}}
                    <td class="undispatched">{{order.OrderStatusName}}</td>
            {{else if order.OrderStatus==2}}
                    <td class="dispatched">{{order.OrderStatusName}}</td>
            {{else if order.OrderStatus==6 || order.OrderStatus==9}}
                    <td class="done">{{order.OrderStatusName}}</td>
            {{else if order.OrderStatus==10}}
                    <td class="settled">{{order.OrderStatusName}}</td>
            {{else if order.OrderStatus==11}}
                    <td class="locked">{{order.OrderStatusName}}</td>
            {{else if order.OrderStatus==12}}
                    <td class="exception">{{order.OrderStatusName}}</td>
            {{else if order.OrderStatus==13}}
                    <td class="arbitrating">{{order.OrderStatusName}}</td>
            {{else if order.OrderStatus==15}}
                    <td class="repealing">{{order.OrderStatusName}}</td>
            {{else}}
                    <td>{{order.OrderStatusName}}</td>
            {{/if}}                             
            {{/if}}
            <td>{{if order.ExceptionStatus==1}}                    
                    {{if order.PlatformName!=null}}
                        <a href="javascript:void(0);" onclick="javascript:Order.privateFunction().showOuterOrder('{{order.PlatformOrderNo}}');">{{order.PlatformName}}</a>
                {{else}}
                        <a href="javascript:void(0)" onclick="javascript:Order.privateFunction().sendOrder('{{order.ProjectGuid}}');">已发单</a>
                {{/if}}
                {{else if order.ExceptionStatus==3}}
                    {{if order.PlatformName!=null}}
                        <a href="javascript:void(0);" onclick="javascript:Order.privateFunction().showPartnerOrder('{{order.PlatformOrderNo}}');">{{order.PlatformName}}</a>
                {{else}}
                        <a href="javascript:void(0)" onclick="javascript:Order.privateFunction().sendOrder('{{order.ProjectGuid}}');">已发单</a>
                {{/if}}                              
                {{else if order.ExceptionStatus==2}}
                    <a href="javascript:void(0)" onclick="javascript:Order.privateFunction().detailsInner('{{order.ProjectGuid}}')">{{order.LevelingStaffName}}</a>
                {{/if}}                                
            </td>
            <td>
                {{if order.GameName=='英雄联盟'}}
                    <a href="/order/queryscore/{{order.ProjectGuid}}" target="_blank">{{order.RoleName}}</a>                
                {{else}}
                    {{order.RoleName}}
                {{/if}}  
            </td>              
            <td style="text-align: left">{{if order.OrderFromName!=''}}
                    [{{order.OrderFromName}}]
                {{/if}}
                <span id="MP_Start_{{order.ProjectGuid}}" style="color: red; display: none;">[多]</span>
                <span id="MP_Repeal_{{order.ProjectGuid}}" style="color: red; display: none;">[撤]</span>
                <span id="MP_Arbit_{{order.ProjectGuid}}" style="color: red; display: none;">[仲]</span>
                {{if order.Urgent==true}}
                    <span style="color: red">[急]</span>
                {{/if}}   
                {{if order.OrderNo!=''}}
                    {{if order.OrderNo.length>21}}
                        <a id="lblOrderNo{{order.ProjectGuid}}" class="easyui-tooltip" title="{{order.OrderNo}}">{{order.OrderNo.substring(0,21)+'...'}}</a>
                {{else}}
                        <span id="lblOrderNo{{order.ProjectGuid}}">{{order.OrderNo}}</span>
                {{/if}}
                    <a href="javascript:void(0)" data-clipboard-action="copy" data-clipboard-target="#lblOrderNo{{order.ProjectGuid}}" class="copy">复制</a>
                {{/if}}                                                             
                {{=formatTag(order.TagID)}} 
                <i class="fa fa-copy-square-o fa-1" aria-hidden="true" style="float: left; line-height: 31px;"
                    data-clipboard-action="copy" data-clipboard-target="#lblOrderNo{{order.ProjectGuid}}" class="copy"
                    onclick="javascript:void(0)');"></i>
            </td>
            <td>
                <div class="digit_item">￥{{order.Price}}</div>
            </td>
            <td>{{#order.StaffName}}</td>
            <td>{{if order.Comment!=null && order.Comment.length>10}}                
                    <a class="easyui-tooltip" title="{{order.Comment}}" style="float: left">{{order.Comment.substring(0,10)+'...'}}</a>
                {{else}}
                    <a class="easyui-tooltip" title="{{order.Comment}}" style="float: left">{{order.Comment}}&nbsp;</a>
                {{/if}}
                <i class="fa fa-pencil-square-o fa-1" aria-hidden="true" style="float: left; line-height: 31px;"
                    onclick="Order.privateFunction().editComment('{{order.ProjectGuid}}');"></i>
            </td>
            <td>{{if status==4}}
                    <span>{{order.StartTime}}</span>
                {{else if status==5}}
                    <span>{{order.FinishTime}}</span>
                {{else if status==10}}
                    <span>{{order.SettleTime}}</span>
                {{else}}
                    <span>{{order.DateCreated}}</span>
                {{/if}}
            </td>
            <td>
                    <a href="javascript:void(0)" onclick="javascript:Order.privateFunction().sendOrder('{{order.ProjectGuid}}');">发单</a>                    
                <a href="javascript:void(0)" onclick="javascript:Order.privateFunction().openSMS('{{order.ProjectGuid}}');" style="margin-left: 10px;">短信</a>
                <a href="javascript:void(0)" class="easyui-menubutton" data-options="menu:'#mm1{{order.ProjectGuid}}'" style="margin-top: -3px; margin-left: 10px;">标记</a>
                <a href="javascript:void(0)" class="easyui-menubutton" data-options="menu:'#mm{{order.ProjectGuid}}'" style="margin-top: -3px;">其他</a>
                <div id="mm{{order.ProjectGuid}}" style="width: 130px;">
                    <div>
                        <a href="javascript:" onclick="javascript:Order.privateFunction().cancelOrder('{{order.ProjectGuid}}');" style="width: 200px; display: block;">删除</a>
                    </div>
                    <div>
                        <a href="javascript:" onclick="javascript:Order.privateFunction().details('{{order.OrderGuid}}^{{order.ProjectGuid}}');" style="width: 200px; display: block;">修改</a>
                    </div>
                    <div>
                        <a href="javascript:" onclick="javascript:Order.privateFunction().setUrgent('{{order.ProjectGuid}}');" style="width: 200px; display: block;" style="width: 200px; display: block;">加急</a>
                    </div>
                    <div>
                        <a href="javascript:" onclick="javascript:Order.privateFunction().showRefund('{{order.ProjectGuid}}');" style="width: 200px; display: block;">退款</a>
                    </div>
                    <div class="menu-sep"></div>
                    <div>
                        <a href="javascript:" onclick="javascript:Order.privateFunction().openSMS('{{order.ProjectGuid}}');" style="width: 200px; display: block;">短信</a>
                    </div>
                    <div class="menu-sep"></div>
                    <div>
                        <a href="javascript:" onclick="javascript:Order.privateFunction().exportOrder('{{order.ProjectGuid}}');" style="width: 200px; display: block;">txt文本</a>
                    </div>
                </div>
                <div id="mm1{{order.ProjectGuid}}" style="width: 130px;">
                    {{each tags as tag index}}
                        <div>
                            <span class="tag" style="background-color: {{tag.Color}}"
                                onclick="javascript:Order.privateFunction().setTag('{{order.ProjectGuid}}',{{tag.ID}});">{{tag.Name}}</span>
                        </div>
                    {{/each}}
                    <div>
                        <span class="tag" style="background-color: #FFF; color: #000; border: 1px solid #808080"
                            onclick="javascript:Order.privateFunction().setTag('{{order.ProjectGuid}}',0);">X 移除标签</span>
                    </div>
                </div>
            </td>
        </tr>
    {{/each}}  
</script>

		</div>
	</div>
</div>


                </section>
            </aside>
        </div>
        <div class="easyui-window" id="window" 
            data-options="modal:true,closed:true,minimizable:false,maximizable:false,collapsible:false,width:600,height:400">        
        </div>       
        <script src="../resource/libs/jquery/jquery-1-4ed679c998.11.3.min.js"></script>
        <script src="../resource/libs/ajaxfileupload-20caa375ef.js"></script>
        <script src="../resource/ui-framework/bootstrap/3.0.3/js/bootstrap-7b3098bda9.min.js"></script>  
        <script src="../resource/ui-framework/bootstrap-daterangepicker/js/moment-zh_cn-3d8809ccd6.js"></script>
        <script src="../resource/ui-framework/bootstrap-daterangepicker/js/daterangepicker-bca1a72d19.js"></script>
        <script src="../resource/ui-framework/admin-lte/app-bf15eda982.js"></script>                 
           
        <script src="../resource/ui-framework/easyui-1.5.2/jquery-623c7c7acd.easyui.min.js"></script>
        <script src="../resource/ui-framework/easyui/plugins/jquery-1db0d9c758.checkbox.js"></script>        
        <script src="../resource/ui-framework/jason/searchbox/searchbox-3fc48f72fe.js"></script>
        <script src="../resource/ui-framework/jason/pager/pager-0646a093e8.js"></script>
        <script src="../resource/ui-framework/jason/status/sky-2d329149af.tools.status.js"></script>
        <script src="../resource/ui-framework/jason/screenshot-paste-0b91b6bd4a.js"></script>
        <script src="../resource/ui-framework/jason/selector/selector-a0b18d2070.js"></script>
        <script src="../resource/ui-framework/jason/button/button-71f76513c7.js"></script>
        <script src="../resource/ui-framework/jason/orderarrow/orderarrow-1bbd8bcec2.js"></script>
        <script src="../resource/libs/clipboard-892cfb62e7.min.js"></script>
        <script src="../resource/libs/template-2d62718262.js"></script>
        <script src="../resource/libs/jquery-d833fe9e58.cookie.js"></script>
        <script src="../resource/libs/common-21f077db5b.js"></script>
        <script src="../resource/libs/tools-4754a28493.js"></script>        
        <script src="../resource/libs/basePage-d30d50f2ce.js"></script>
        
    <script src="../static/js/order-627da7e816.js"></script>    

        <script type="text/javascript">
            $().ready(function () {
                var url = $('#hdnURL').val();

                $('.sidebar .treeview').each(function (index, item) {
                    var btn = $(this).children("a").first();
                    var menu = $(this).children(".treeview-menu").first();

                    $(this).find('a').each(function (index, item) {
                        if ($(item).attr('href') == url) {
                            menu.show();
                            btn.children(".fa-angle-left").first().removeClass("fa-angle-left").addClass("fa-angle-down");
                        }
                    });
                });
            });
        </script>
    </body>
</html>